package com.twu.biblioteca;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: ysotirov
 * Date: 03/02/13
 * Time: 18:58
 * To change this template use File | Settings | File Templates.
 */
public class Member {
    String libraryID;
    String password;
    String name;
    String email;
    String phone;
    private boolean loggedin;
    ArrayList<String> reservedBooks;

    public Member (String libID, String pass){
        libraryID = libID;
        password = pass;
        loggedin = false;
        reservedBooks = new ArrayList<String>();
    }

    public void setName(String names){
        name = names;
    }

    public void setEmail(String em){
        email = em;
    }

    public void setPhone(String ph){
        phone = ph;
    }

    public void setDetails(String names, String em, String ph){
        name = names;
        email = em;
        phone = ph;
    }

    public void logIn(String username, String pass){

        if (username.contains(libraryID) && pass.contains(password))
            loggedin = true;
    }

    public boolean isLoggedIn(){
        if (loggedin) return true;
        return false;
    }


}
